package com.ysk.testapplication;

import android.os.Bundle;
import android.view.View;

import com.ysk.testapplication.qcm.ViewController;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

/**
 * @author RQ
 * date    2022-01-27 17:06
 */
public class BaseFragment extends Fragment {
  ViewController mViewController;

  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mViewController = new ViewController(this);
  }

  public void setData2View(final int viewId, final Object obj) {
    mViewController.setData2View(viewId, obj);
  }

  @Override
  public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mViewController.onViewCreate();
  }
}
